<?php
include("include/config.inc.php");
if(!isset($_SESSION['s_activId']))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
else
{
  if(isset($_POST['partyIdForDate']))
	{
    $date = $_POST['newRemindDateYear']."-".$_POST['newRemindDateMonth']."-".$_POST['newRemindDateDay'];
		foreach($_POST['partyIdForDate'] as $key => $value)
		{
			if($value == 1)
			{
		    echo "<BR>".$updatePartyDate = "UPDATE party 
		                           SET remindDate = '".$date."'
		    	   	               WHERE partyId = ".$key;
		    $updatePartyDateRes = mysql_query($updatePartyDate);
		    if(!$updatePartyDateRes)
		    {		
			    echo "U Fail";
		    }		
		  }
		}
  }
}
include("./bottom.php");
header("Location: ./summary.php?reminders=1");
?>
